home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Fatted Calf
/
The Fatted Calf.iso
/
Applications
/
Games
/
othello
/
Source
/
Othello.h
< prev
next >
Wrap
Text File
|
1992-09-27
|
2KB
|
72 lines
/* #define section -- set up the macros and definitions that make the code
* marginally more readable.
*/
#define EMPTY 0
#define WHITE 1
#define BLACK 2
#define FIELD_WIDTH 8
#define FIELD_HEIGHT 8
#define NUM_SPACES (FIELD_WIDTH * FIELD_HEIGHT)
#define cell(x, y) (x + (y * FIELD_WIDTH))
#define x(num) (num % FIELD_WIDTH)
#define y(num) (num / FIELD_HEIGHT)
/* Generated by Interface Builder */
#import <objc/Object.h>
#import <appkit/Control.h>
#import <appkit/Button.h>
#import <appkit/Matrix.h>
#import <appkit/TextField.h>
#import <string.h>
#import <stdlib.h>
#import <streams/streams.h>
#import <appkit/OpenPanel.h>
@interface Othello:Object
{
id playField;
id black_time;
id white_time;
id white_number;
id black_number;
id status;
id savePanel;
short theField[NUM_SPACES+1];
short theBckField[NUM_SPACES+1];
short theTurn;
}
- saveGame:sender;
- newGame:sender;
- openGame:sender;
- undo:sender;
- swap;
- backup;
- updateField:sender;
- updatePlace:(int) theCell forPlayer:(int) thePlayer;
- (BOOL) checkDirection:(int) xDelta:(int) yDelta fromCell:(int)theCell
forPlayer:(int) thePlayer;
- (void) doDirection:(int) xDelta:(int) yDelta fromCell:(int)theCell
forPlayer:(int) thePlayer;
- (BOOL) allDirectionsFromCell:(int)theCell flipPieces:(BOOL) move;
- (BOOL) allDirectionsFromCell:(int)theCell flipPieces:(BOOL) move
forPlayer:(int) thePlayer;
- (BOOL) canPlay:(int) thePlayer;
- moveMade:sender;
- (char *) playerToString:(int) thePlayer;
- (char *) turnString;
- appDidInit:sender;
@end